package com.youlai.boot.system.model.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.youlai.boot.common.listener.CreatedByListenerFlag;
import com.youlai.boot.common.listener.UpdatedByListenerFlag;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 系统配置 实体
 *
 * @author Theo
 * @since 2024-07-29 11:17:26
 */
@Getter
@Setter
@Accessors(chain = true)
@Table(value = "sys_config")
public class SysConfigEntity implements CreatedByListenerFlag, UpdatedByListenerFlag {
    /**
     * 主键ID
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 配置名称
     */
    @Column(value = "config_name")
    private String configName;

    /**
     * 配置键
     */
    @Column(value = "config_key")
    private String configKey;

    /**
     * 配置值
     */
    @Column(value = "config_value")
    private String configValue;

    /**
     * 描述、备注
     */
    @Column(value = "remark")
    private String remark;

    /**
     * 更新人ID
     */
    @Column(value = "update_by")
    private Long updateBy;

    /**
     * 创建人ID
     */
    @Column(value = "create_by")
    private Long createBy;

    /**
     * 逻辑删除
     */
    @Column(value = "is_deleted", isLogicDelete = true)
    private Integer isDeleted;

    /**
     * 创建时间
     */
    @Column(value = "create_time", onInsertValue = "now()")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(value = "update_time", onInsertValue = "now()", onUpdateValue = "now()")
    private Date updateTime;


}
